package com.foldingleaf.record.service.impl;

import java.util.List;
import com.foldingleaf.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foldingleaf.record.mapper.SysCollectionOrderRecordMapper;
import com.foldingleaf.record.domain.SysCollectionOrderRecord;
import com.foldingleaf.record.service.ISysCollectionOrderRecordService;

/**
 * 藏品订单记录Service业务层处理
 * 
 * @author ajian
 * @date 2022-06-04
 */
@Service
public class SysCollectionOrderRecordServiceImpl implements ISysCollectionOrderRecordService 
{
    @Autowired
    private SysCollectionOrderRecordMapper sysCollectionOrderRecordMapper;

    /**
     * 查询藏品订单记录
     * 
     * @param collectionOrderRecordId 藏品订单记录主键
     * @return 藏品订单记录
     */
    @Override
    public SysCollectionOrderRecord selectSysCollectionOrderRecordByCollectionOrderRecordId(Long collectionOrderRecordId)
    {
        return sysCollectionOrderRecordMapper.selectSysCollectionOrderRecordByCollectionOrderRecordId(collectionOrderRecordId);
    }

    /**
     * 查询藏品订单记录列表
     * 
     * @param sysCollectionOrderRecord 藏品订单记录
     * @return 藏品订单记录
     */
    @Override
    public List<SysCollectionOrderRecord> selectSysCollectionOrderRecordList(SysCollectionOrderRecord sysCollectionOrderRecord)
    {
        return sysCollectionOrderRecordMapper.selectSysCollectionOrderRecordList(sysCollectionOrderRecord);
    }

    /**
     * 新增藏品订单记录
     * 
     * @param sysCollectionOrderRecord 藏品订单记录
     * @return 结果
     */
    @Override
    public int insertSysCollectionOrderRecord(SysCollectionOrderRecord sysCollectionOrderRecord)
    {
        sysCollectionOrderRecord.setCreateTime(DateUtils.getNowDate());
        return sysCollectionOrderRecordMapper.insertSysCollectionOrderRecord(sysCollectionOrderRecord);
    }

    /**
     * 修改藏品订单记录
     * 
     * @param sysCollectionOrderRecord 藏品订单记录
     * @return 结果
     */
    @Override
    public int updateSysCollectionOrderRecord(SysCollectionOrderRecord sysCollectionOrderRecord)
    {
        return sysCollectionOrderRecordMapper.updateSysCollectionOrderRecord(sysCollectionOrderRecord);
    }

    /**
     * 批量删除藏品订单记录
     * 
     * @param collectionOrderRecordIds 需要删除的藏品订单记录主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionOrderRecordByCollectionOrderRecordIds(Long[] collectionOrderRecordIds)
    {
        return sysCollectionOrderRecordMapper.deleteSysCollectionOrderRecordByCollectionOrderRecordIds(collectionOrderRecordIds);
    }

    /**
     * 删除藏品订单记录信息
     * 
     * @param collectionOrderRecordId 藏品订单记录主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionOrderRecordByCollectionOrderRecordId(Long collectionOrderRecordId)
    {
        return sysCollectionOrderRecordMapper.deleteSysCollectionOrderRecordByCollectionOrderRecordId(collectionOrderRecordId);
    }
}
